home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / sblib10.zip / VOCPLAY.C < prev    next >
C/C++ Source or Header  |  1993-09-11  |  730b  |  35 lines

  1. /*
  2.  * VOCPLAY.C - Test program using SBLIB.LIB
  3.  *   Written by Brian Clayton
  4.  *
  5.  * NOTE: you need to use the Large or Huge memory model
  6.  */
  7.  
  8. #include <dos.h>
  9. #include <stdio.h>
  10. #include "sblib.h"
  11.  
  12. void main( void )
  13.     {
  14.     unsigned err, seg, status;
  15.     int handle, x;
  16.  
  17.     err = _dos_allocmem( 8000 >> 4, &seg );
  18.     if( err != 0 )
  19.         exit(2);
  20.     loaddrv( seg, 8000, "CTVDSK.DRV" );
  21.     /* These next two lines are optional (see docs) */
  22.     setbaseio( 0x220 );
  23.     setint( 7 );
  24.     err = initdrv( 10, &status );
  25.     printf( "Playing TEST.VOC, press any key to quit..." );
  26.     _dos_open( "test.voc", 0, &handle );
  27.     playvoc( handle );
  28.     getch();
  29.     stopvoc( );
  30.     _dos_close( handle );
  31.     unloaddrv();
  32.     _dos_freemem( seg );
  33.     exit(0);
  34.     }
  35.